/*
  取消列队等待的任务
 */

const yunji = require('yi-yunji');

module.exports = {
    handler(req, res, next) {
        let doc = req.query;
        yunji.ScheduleCancel(doc.placeId,doc.taskId,(e,r)=>{
            let message = '';
            if(r.errcode===0){
                message = '排队任务已取消';
            }else{
                message = '排队任务取消失败';
            }
            res.reply({code:r.errcode,message:message,data:r.data})
        });
    }

};
